package org.scheduler4j.scheduler;

import java.util.Date;

import org.scheduler4j.Month;

/**
 * define a condition to choose a specific day, such as first Friday, or last
 * Monday.
 * 
 * @author Eric
 * 
 */
public class DateSelector {
	/**
	 * the sequence of this condition, such as first, second, third, fourth or
	 * last.
	 * 
	 * @see org.scheduler4j.Constants.FIRST
	 * @see org.scheduler4j.Constants.SECOND
	 * @see org.scheduler4j.Constants.THIRD
	 * @see org.scheduler4j.Constants.FOURTH
	 * @see org.scheduler4j.Constants.LAST
	 * 
	 */
	private int sequence;

	/**
	 * the date to matched, such as Monday, Day, Weekday or Weekend Day.
	 * 
	 * @see org.scheduler4j.Constants.DAY_SUNDAY
	 * @see org.scheduler4j.Constants.DAY_MONDAY
	 * @see org.scheduler4j.Constants.DAY_TUESDAY
	 * @see org.scheduler4j.Constants.DAY_WEDNESDAY
	 * @see org.scheduler4j.Constants.DAY_THURSDAY
	 * @see org.scheduler4j.Constants.DAY_FRIDAY
	 * @see org.scheduler4j.Constants.DAY_SATURDAY
	 * @see org.scheduler4j.Constants.DAY
	 * @see org.scheduler4j.Constants.DAY_WEEKDAY
	 * @see org.scheduler4j.Constants.DAY_WEEKENDDAY
	 */
	private int day;

	/**
	 * constructor for DateSelector
	 * 
	 * @param sequence
	 * @param day
	 */
	public DateSelector(int sequence, int day) {
		this.sequence = sequence;
		this.day = day;
	}

	/**
	 * certain a day meets the condition of this selector for given month.
	 * 
	 * @param month
	 *            the month to check.
	 * @return the corrected date found.
	 */
	public Date select(Month month) {
		// TODO need to be implemented.
		return null;
	}

	public int getSequence() {
		return sequence;
	}

	public void setSequence(int sequence) {
		this.sequence = sequence;
	}

	public int getDay() {
		return day;
	}

	public void setDay(int day) {
		this.day = day;
	}

}
